package cn.leelei.spring.Advice;

import org.apache.log4j.Logger;
import org.aspectj.lang.ProceedingJoinPoint;



public class LoggerAdvice {
    private static final Logger LOGGER = Logger.getLogger(String.valueOf(LoggerAdvice.class));

    public  void before(){
        System.out.println("在方法执行前");
    }

    public void after(){
        System.out.println("在方法执行后");
    }

    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        Object money = joinPoint.getArgs()[0];
        Object result = joinPoint.proceed();
        LOGGER.debug("支付了"+money+"  结果为："+result);
        return result;


    }
}
